"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var index_1 = require("@/index");
function default_1(chartTarget, dataSource, reRender, destroyMySelf) {
    var container = document.getElementById(chartTarget === null || chartTarget === void 0 ? void 0 : chartTarget.getConfig("container"));
    var myChartTarget = window.echarts.init(container);
    var myOptions = (chartTarget === null || chartTarget === void 0 ? void 0 : chartTarget.getConfig("ChartOptions")) || {};
    myChartTarget.setOption(myOptions);
    myChartTarget.on('click', 'series', function () {
        var events = chartTarget === null || chartTarget === void 0 ? void 0 : chartTarget.getConfig("events");
        var newChart = index_1.ChartIdMap.get(events["button1"].target);
        newChart === null || newChart === void 0 ? void 0 : newChart.self.render();
    });
    (0, index_1.effect)(function () {
        // innerSpan.innerHTML = chartTarget?.getConfig("title")||"空空如也";
    }, [chartTarget]);
    (0, index_1.effect)(function () {
        // console.log("dataSource，指定重绘区域工作，"+chartTarget?.getConfig("id"))
        // console.log(dataSource?.getFilter())
        // innerSpan.innerHTML = chartTarget?.getConfig("title")||"空空如也";
    }, [dataSource]);
}
exports.default = default_1;
